package vn.fpt.fsoft.entities;




import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;



/**
 * Author:	DuongPV1
 * Entity User mapping with table User in database
 * 
 * */
@Entity
@Table(name="User")
public class User implements java.io.Serializable {


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name="UserId")
	private int userId;
	@Column(name="Account")
	private String account;
	@Column(name="Email")
	private String email;
	@Column(name="Password")
	private String password;
	/*@OneToMany(mappedBy="user")
	private Set<SupportingMaterial> supportingMaterial;*/
    /**
	 * @param userId
	 * @param account
	 * @param email
	 * @param password
	 * @param supportingMaterials
	 */
	public User(int userId, String account, String email, String password) {
		super();
		this.userId = userId;
		this.account = account;
		this.email = email;
		this.password = password;
	}

	public User() {
		// TODO Auto-generated constructor stub
	}
    
	/**
	 * @param userId
	 * @param account
	 * @param email
	 * @param password
	 * @param supportingMaterials
	 */

	/*public void setSupportingMaterial(Set<SupportingMaterial> supportingMaterial) {
		this.supportingMaterial = supportingMaterial;
	}
	public Set<SupportingMaterial> getSupportingMaterial() {
		return supportingMaterial;
	}*/
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
}
